<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>商品分类管理</title>
</head>
<body>
<a href="index.php?act=cate&op=cate_add">添加分类</a>
<form method="post" action="index.php?act=cate&op=cate_list">
    <select name="search_field">
        <option value="cate_name">分类名称</option>
    </select>
    <input type="text" name="field_value" value="<?php echo !empty($_POST['field_value'])?$_POST['field_value']:''?>" />
<input type="submit" value="查询" />
    </form>
<form action="index.php?act=cate&op=cate_del_more" method="post">
<table>
    <tr><th><input type="submit" value="删除多个" onclick="javascript:return confirm('确定删除吗？')" /></th><th>分类编号</th><th>分类名称</th><th>分类等级</th><th>操作</th></tr>
<?php foreach($cate_list as $cate_row){?>
    <tr>
        <td><input type="checkbox" name="cate_del[]" value="<?php echo $cate_row['cate_id']?>" /></td>
        <td><?php echo $cate_row['cate_id']?></td>
        <td><?php echo str_repeat('&nbsp;',$cate_row['level']).$cate_row['cate_name']?></td>
        <td align="center"><?php echo $cate_row['level_name']?></td>
        <td><a href="index.php?act=cate&op=cate_del_one&cate_id=<?php echo $cate_row['cate_id']?>" onclick="return confirm('确定删除吗？')">删除</a> | <a href="index.php?act=cate&op=cate_edit&cate_id=<?php echo $cate_row['cate_id']?>">编辑</a></td>
    </tr>
<?php }?>
    </table>
    </form>
<select name="p_id">
    <?php foreach($cate_list as $cate_row){?>
    <option value="<?php echo $cate_row['cate_id']?>"><?php echo str_repeat('&nbsp;&nbsp;',$cate_row['level']).$cate_row['cate_name']?></option>
    <?php }?>
</select>
</body>
</html>